/**
 * @Author: Wangaxb
 * @Date: 2019年9月23日
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';
// 执行保存信息发布
export const saveInfo = params => axios.post(`${SERVER.SPAREPARTS}/exchange_platform/save`, params);
// 根据条件查询发布信息
export const getInfo = params => axios.get(`${SERVER.SPAREPARTS}/exchange_platform/search`, { params });
// 查询当前经销商是否有发布的的信息
export const findOne = params => axios.get(`${SERVER.SPAREPARTS}/exchange_platform/duplicate`, { params });
// 执行订单保存
export const saveOrder = params => axios.post(`${SERVER.SPAREPARTS}/exchange_order/save`, params);
// 仓库下拉选
export const getStorageList = params => axios.get(`${SERVER.SPAREPARTS}/storage`, { params });
// 获取当前经销商信息
export const getDealerInfo = params => axios.get(`${SERVER.SPAREPARTS}/dealerInfo/getInfo`);
// 查询备件接口
export const queryStorageByPart = params => axios.get(`${SERVER.DMSCLOUD_PART}/stockmanage/partmanage/queryStorageByPart`, { params });
// 经销商大区查询
export const getOrgByOrgType = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/org/getOrgByOrgType`, { params });
// 经销商小区查询
export const detail = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/org/detail`, { params });
// 获取当前经销商信息
export const getDealerCompanyByCode = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/dealer/getDealerChannelByCode`, { params });
// 经销商小区查询
export const getChildOrgByOrgId = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/org/getChildOrgByOrgId`, { params });
// 下线信息
export const offline = params => axios.post(`${SERVER.SPAREPARTS}/exchange_platform/offline/${params}`);
// 查询库龄
export const queryStockAge = params => axios.get(`${SERVER.DMSCLOUD_PART}/stockmanage/partmanage/queryStockAge`, { params });
